from Base import message, intersect, SS_VALID
from DRG import MDCG_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["53.5101","53.6301","53.4101","53.4201","53.4301","53.4901","53.4902","53.5100","53.5900x001","53.5901","53.5902","53.6101","53.6200","53.6302","53.6900x002","53.6901"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合GF2入组条件，匹配规则：主手术匹配')

    if MDCG_DRG.GF23_group(record):
      return 'GF23'

    if MDCG_DRG.GF25_group(record):
      return 'GF25'
        
    return 'GF2'
  else:
    return ''
    
